Solving for initial velocity